﻿using System;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;

using XamlInspector.Foundation;

namespace XamlInspector.Presentation
{
    public sealed partial class LauncherControl
    {
        public LauncherControl()
        {
            InitializeComponent();
            Tapped += (s, e) => ExpandInspector.Fire(this);
        }

        public event EventHandler ExpandInspector;

        public void Show()
        {
            var popup = new Popup();
            popup.VerticalOffset = 0;
            popup.HorizontalOffset = Window.Current.Bounds.Width / 2;
            popup.Child = this;
            popup.IsOpen = true;
        }
    }
}
